 function background() {
        let background = document.querySelector('#background');
        let background_x = window.getComputedStyle(background).width.split("px")[0] / window.innerWidth * 100; //获得设置在css中的width值
        let cali = (background_x - 100)*0.5; //获得校准值,*0.9是为了防止误差,因为图片的x和y值都是一样的（number vw），所以校准值任取background_x来获取就行

        background.onmousemove = (event) => {
            //获取鼠标位置
            let max_x = window.innerWidth;
            let max_y = window.innerHeight;
            let proportion_x = event.pageX  / max_x;
            let proportion_y = event.pageY / max_y;
            //获取鼠标所在的位置比例0
            let cali_x = proportion_x * -cali + "vw"; //-cali是一个校准值，根据-(width-100vw)*0.5
            let cali_y = proportion_y * -cali + "vh"; //cali是一个校准值，根据-(height-100vw)*0.5
            background.setAttribute("style", `transform: translate(${cali_x},${cali_y});`) //直接设置属性值
        }
    }
    background();